<!DOCTYPE html>
<html lang="ch">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>vue指令</title>
    <script src="vue.js"></script>
  </head>
  <body>
    <div id="app">
      <a v-bind:href="url">链接1</a>
      <a :href="url">链接2</a>
      <input type="text" v-model="url" />
    </div>
  </body>
  <script>
    new new Vue({
      el: "#app",
      data() {
        return {
          url: "http://www.baidu.com",
        };
      },
    })();
  </script>
</html>
